// pages/share/share1.js
var app = getApp();
Page({
 
  /**
   * 页面的初始数据
   */
  data: {

    username:'',
    wanchetext:'',
    mycode:'',


    hideModal:true, //模态框的状态  true-隐藏  false-显示
    animationData:{},//
  }, 
 
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
     
    var that = this;
    that.setData({username:options.username});
    this.data.username = options.username;
  if(options.phone=='01089557599'){

    that.setData({wanchetext:"万车"});
    that.setData({wanchephone:options.phone});


  }else{

    that.setData({wanchetext:options.code});
    that.setData({wanchephone:options.phone});

  }

  that.setData({

        
    mycode:app.globalData.wxMinAppURL+'getWxMinCodeImageBuffer/?code='+options.username

  })
    
    },

    previewImg: function (e) {
      var code = this.data.username;
      console.log('shareing 点击图片：' + code);
      wx.previewImage({
        current: app.globalData.wxMinAppURL+'getWxMinCodeImageBuffer/?code='+code, // 当前显示图片的http链接
        urls: [app.globalData.wxMinAppURL+'getWxMinCodeImageBuffer/?code='+code] // 需要预览的图片http链接列表
      })
     
    },


    /****点击进入我的团队界面 */
    formyteam: function(e){

     
        wx.navigateTo({
          url: 'team?code='+this.data.username
        })
         
    },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

   

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})